<!DOCTYPE html>
<html lang="zh-cn">
	<head>
	    <meta charset="utf-8">
	   	<title>HTML TEMP </title>
	   	<script type="text/javascript">
	   		function test(){
	   		//var name=document.getElementById("name_tb").value;
	   		var nameInput=document.getElementById("name_tb");
	   		console.log(nameInput);
	   		var name=nameInput.value;
	   			alert(name+"是好人");
	   		}
	   		//test();
	   	</script>
	</head>
	<body>
		<input id="name_tb" type="text" >
		<input type="button" value="click me" onclick="test()">
	</body>
</html>